<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<meta name="theme-color" content="#222"><meta name="generator" content="Hexo 6.3.0">

  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png">
  <link rel="mask-icon" href="/images/logo.svg" color="#222">

<link rel="stylesheet" href="/css/main.css">



<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.1/css/all.min.css" integrity="sha256-Z1K5uhUaJXA7Ll0XrZ/0JhX4lAtZFpT6jkKrEDT0drU=" crossorigin="anonymous">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.1.1/animate.min.css" integrity="sha256-PR7ttpcvz8qrF57fur/yAx1qXMFJeJFiA6pSzWi0OIE=" crossorigin="anonymous">

<script class="next-config" data-name="main" type="application/json">{"hostname":"example.com","root":"/","images":"/images","scheme":"Muse","darkmode":false,"version":"8.14.1","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12},"copycode":{"enable":false,"style":null},"bookmark":{"enable":false,"color":"#222","save":"auto"},"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"stickytabs":false,"motion":{"enable":true,"async":false,"transition":{"menu_item":"fadeInDown","post_block":"fadeIn","post_header":"fadeInDown","post_body":"fadeInDown","coll_header":"fadeInLeft","sidebar":"fadeInUp"}},"prism":false,"i18n":{"placeholder":"搜索...","empty":"没有找到任何搜索结果：${query}","hits_time":"找到 ${hits} 个搜索结果（用时 ${time} 毫秒）","hits":"找到 ${hits} 个搜索结果"},"path":"/search.xml","localsearch":{"enable":true,"trigger":"auto","top_n_per_article":-1,"unescape":false,"preload":false}}</script><script src="/js/config.js"></script>

    <meta name="description" content="Add Threads（Users）添加线程组线程组主要参数详解  线程数：虚拟用户数。一个虚拟用户占用一个进程或线程。模拟多少用户访问也就填写多少个线程数量。 Ramp-Up时间(秒)：设置的虚拟用户数需要多长时间全部启动。如果线程数为100，准备时长为5，那么需要5秒钟启动100个线程，也就是每秒钟启动20个线程。 相当于每秒模拟20个用户进行访问，设置为零我理解为并发访问。 循环次数：如果线">
<meta property="og:type" content="article">
<meta property="og:title" content="Jmeter使用">
<meta property="og:url" content="http://example.com/2021/11/29/Jmeter%E4%BD%BF%E7%94%A8/index.html">
<meta property="og:site_name" content="JsyBlog">
<meta property="og:description" content="Add Threads（Users）添加线程组线程组主要参数详解  线程数：虚拟用户数。一个虚拟用户占用一个进程或线程。模拟多少用户访问也就填写多少个线程数量。 Ramp-Up时间(秒)：设置的虚拟用户数需要多长时间全部启动。如果线程数为100，准备时长为5，那么需要5秒钟启动100个线程，也就是每秒钟启动20个线程。 相当于每秒模拟20个用户进行访问，设置为零我理解为并发访问。 循环次数：如果线">
<meta property="og:locale" content="zh_CN">
<meta property="article:published_time" content="2021-11-29T02:18:42.000Z">
<meta property="article:modified_time" content="2021-12-17T15:03:46.828Z">
<meta property="article:author" content="SongyangJi">
<meta property="article:tag" content="Jmeter">
<meta property="article:tag" content="测试">
<meta name="twitter:card" content="summary">


<link rel="canonical" href="http://example.com/2021/11/29/Jmeter%E4%BD%BF%E7%94%A8/">



<script class="next-config" data-name="page" type="application/json">{"sidebar":"","isHome":false,"isPost":true,"lang":"zh-CN","comments":true,"permalink":"http://example.com/2021/11/29/Jmeter%E4%BD%BF%E7%94%A8/","path":"2021/11/29/Jmeter使用/","title":"Jmeter使用"}</script>

<script class="next-config" data-name="calendar" type="application/json">""</script>
<title>Jmeter使用 | JsyBlog</title>
  








  <noscript>
    <link rel="stylesheet" href="/css/noscript.css">
  </noscript>
</head>

<body itemscope itemtype="http://schema.org/WebPage" class="use-motion">
  <div class="headband"></div>

  <main class="main">
    <div class="column">
      <header class="header" itemscope itemtype="http://schema.org/WPHeader"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏" role="button">
        <span class="toggle-line"></span>
        <span class="toggle-line"></span>
        <span class="toggle-line"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <i class="logo-line"></i>
      <p class="site-title">JsyBlog</p>
      <i class="logo-line"></i>
    </a>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger" aria-label="搜索" role="button">
        <i class="fa fa-search fa-fw fa-lg"></i>
    </div>
  </div>
</div>



<nav class="site-nav">
  <ul class="main-menu menu"><li class="menu-item menu-item-home"><a href="/" rel="section"><i class="fa fa-home fa-fw"></i>首页</a></li><li class="menu-item menu-item-tags"><a href="/tags/" rel="section"><i class="fa fa-tags fa-fw"></i>标签</a></li><li class="menu-item menu-item-categories"><a href="/categories/" rel="section"><i class="fa fa-th fa-fw"></i>分类</a></li><li class="menu-item menu-item-archives"><a href="/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>归档</a></li>
      <li class="menu-item menu-item-search">
        <a role="button" class="popup-trigger"><i class="fa fa-search fa-fw"></i>搜索
        </a>
      </li>
  </ul>
</nav>



  <div class="search-pop-overlay">
    <div class="popup search-popup"><div class="search-header">
  <span class="search-icon">
    <i class="fa fa-search"></i>
  </span>
  <div class="search-input-container">
    <input autocomplete="off" autocapitalize="off" maxlength="80"
           placeholder="搜索..." spellcheck="false"
           type="search" class="search-input">
  </div>
  <span class="popup-btn-close" role="button">
    <i class="fa fa-times-circle"></i>
  </span>
</div>
<div class="search-result-container no-result">
  <div class="search-result-icon">
    <i class="fa fa-spinner fa-pulse fa-5x"></i>
  </div>
</div>

    </div>
  </div>

</header>
        
  
  <aside class="sidebar">

    <div class="sidebar-inner sidebar-nav-active sidebar-toc-active">
      <ul class="sidebar-nav">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <div class="sidebar-panel-container">
        <!--noindex-->
        <div class="post-toc-wrap sidebar-panel">
            <div class="post-toc animated"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#Add-Threads%EF%BC%88Users%EF%BC%89%E6%B7%BB%E5%8A%A0%E7%BA%BF%E7%A8%8B%E7%BB%84"><span class="nav-number">1.</span> <span class="nav-text">Add Threads（Users）添加线程组</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Add-Sample-%E6%B7%BB%E5%8A%A0%E5%8F%96%E6%A0%B7%E5%99%A8%EF%BC%88%EF%BC%89"><span class="nav-number">2.</span> <span class="nav-text">Add Sample 添加取样器（）</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#Add-Sample-HTTP-Request-%E6%B7%BB%E5%8A%A0http%E6%8E%A5%E5%8F%A3%E6%B5%8B%E8%AF%95%EF%BC%88%EF%BC%89"><span class="nav-number">2.1.</span> <span class="nav-text">Add Sample HTTP Request 添加http接口测试（）</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E6%96%AD%E8%A8%80"><span class="nav-number">3.</span> <span class="nav-text">断言</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#Add-Assertions-Json-Assertion-%E6%B7%BB%E5%8A%A0Json%E6%96%AD%E8%A8%80%EF%BC%88%EF%BC%89"><span class="nav-number">3.1.</span> <span class="nav-text">Add Assertions Json Assertion 添加Json断言（）</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#Add-Listener-Assertion-Results-%E6%B7%BB%E5%8A%A0%E6%96%AD%E8%A8%80%E7%BB%93%E6%9E%9C%EF%BC%88%EF%BC%89"><span class="nav-number">3.2.</span> <span class="nav-text">Add Listener Assertion Results 添加断言结果（）</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E7%BB%93%E6%9E%9C%E6%8A%A5%E5%91%8A"><span class="nav-number">4.</span> <span class="nav-text">结果报告</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#Add-Listener-View-Results-Tree-%E6%B7%BB%E5%8A%A0%E5%AF%9F%E7%9C%8B%E7%BB%93%E6%9E%9C%E6%A0%91%EF%BC%88%EF%BC%89"><span class="nav-number">4.1.</span> <span class="nav-text">Add Listener View Results Tree 添加察看结果树（）</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#Add-Listener-Aggregate-Report-%E6%B7%BB%E5%8A%A0%E8%81%9A%E5%90%88%E6%8A%A5%E5%91%8A%EF%BC%88%EF%BC%89"><span class="nav-number">4.2.</span> <span class="nav-text">Add Listener Aggregate Report 添加聚合报告（）</span></a></li></ol></li></ol></div>
        </div>
        <!--/noindex-->

        <div class="site-overview-wrap sidebar-panel">
          <div class="site-author animated" itemprop="author" itemscope itemtype="http://schema.org/Person">
  <p class="site-author-name" itemprop="name">SongyangJi</p>
  <div class="site-description" itemprop="description"></div>
</div>
<div class="site-state-wrap animated">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
        <a href="/archives/">
          <span class="site-state-item-count">251</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
          <a href="/categories/">
        <span class="site-state-item-count">45</span>
        <span class="site-state-item-name">分类</span></a>
      </div>
      <div class="site-state-item site-state-tags">
          <a href="/tags/">
        <span class="site-state-item-count">109</span>
        <span class="site-state-item-name">标签</span></a>
      </div>
  </nav>
</div>

        </div>
      </div>
    </div>

    
  </aside>


    </div>

    <div class="main-inner post posts-expand">


  


<div class="post-block">
  
  

  <article itemscope itemtype="http://schema.org/Article" class="post-content" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="http://example.com/2021/11/29/Jmeter%E4%BD%BF%E7%94%A8/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/avatar.gif">
      <meta itemprop="name" content="SongyangJi">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="JsyBlog">
      <meta itemprop="description" content="">
    </span>

    <span hidden itemprop="post" itemscope itemtype="http://schema.org/CreativeWork">
      <meta itemprop="name" content="Jmeter使用 | JsyBlog">
      <meta itemprop="description" content="">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          Jmeter使用
        </h1>

        <div class="post-meta-container">
          <div class="post-meta">
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-calendar"></i>
      </span>
      <span class="post-meta-item-text">发表于</span>

      <time title="创建时间：2021-11-29 10:18:42" itemprop="dateCreated datePublished" datetime="2021-11-29T10:18:42+08:00">2021-11-29</time>
    </span>
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-calendar-check"></i>
      </span>
      <span class="post-meta-item-text">更新于</span>
      <time title="修改时间：2021-12-17 23:03:46" itemprop="dateModified" datetime="2021-12-17T23:03:46+08:00">2021-12-17</time>
    </span>
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-folder"></i>
      </span>
      <span class="post-meta-item-text">分类于</span>
        <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
          <a href="/categories/%E6%B5%8B%E8%AF%95/" itemprop="url" rel="index"><span itemprop="name">测试</span></a>
        </span>
    </span>

  
</div>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">
        <h2 id="Add-Threads（Users）添加线程组"><a href="#Add-Threads（Users）添加线程组" class="headerlink" title="Add Threads（Users）添加线程组"></a>Add Threads（Users）添加线程组</h2><p><strong>线程组主要参数详解</strong></p>
<ol>
<li>线程数：虚拟用户数。一个虚拟用户占用一个进程或线程。模拟多少用户访问也就填写多少个线程数量。</li>
<li>Ramp-Up时间(秒)：设置的虚拟用户数需要多长时间全部启动。如果线程数为<code>100</code>，准备时长为<code>5</code>，那么需要<code>5</code>秒钟启动<code>100</code>个线程，也就是每秒钟启动<code>20</code>个线程。 相当于每秒模拟<code>20</code>个用户进行访问，设置为零我理解为并发访问。</li>
<li>循环次数：如果线程数为<code>100</code>，循环次数为<code>100</code>。那么总请求数为<code>100*100=10000</code> 。如果勾选了“永远”，那么所有线程会一直发送请求，直到选择停止运行脚本。</li>
</ol>
<h2 id="Add-Sample-添加取样器（）"><a href="#Add-Sample-添加取样器（）" class="headerlink" title="Add Sample 添加取样器（）"></a>Add Sample 添加取样器（）</h2><h3 id="Add-Sample-HTTP-Request-添加http接口测试（）"><a href="#Add-Sample-HTTP-Request-添加http接口测试（）" class="headerlink" title="Add Sample HTTP Request 添加http接口测试（）"></a>Add Sample HTTP Request 添加http接口测试（）</h3><p><strong>Http请求主要参数详解</strong></p>
<ul>
<li>协议：向目标服务器发送HTTP请求协议，可以是<code>HTTP</code>或<code>HTTPS</code>，默认为<code>HTTP</code>。</li>
<li>服务器名称或IP ：<code>HTTP</code>请求发送的目标服务器名称或<code>IP</code>。</li>
<li>端口号：目标服务器的端口号，默认值为80</li>
<li>方法：发送<code>HTTP</code>请求的方法，可用方法包括<code>GET</code>、<code>POST</code>、<code>HEAD</code>、<code>PUT</code>、<code>OPTIONS</code>、<code>TRACE</code>、<code>DELETE</code>等。</li>
<li>路径：目标<code>URL</code>路径（<code>URL</code>中去掉服务器地址、端口及参数后剩余部分）。</li>
<li>字符集编码：编码方式，默认为<code>ISO-8859-1</code>编码，这里配置为<code>utf-8</code>。</li>
<li>参数：同请求一起发送参数 ，在请求中发送的<code>URL</code>参数，用户可以将<code>URL</code>中所有参数设置在本表中，表中每行为一个参数（对应<code>URL</code>中的 <code>key=value</code>），注意参数传入中文时需要勾选“编码”。</li>
</ul>
<h2 id="断言"><a href="#断言" class="headerlink" title="断言"></a>断言</h2><h3 id="Add-Assertions-Json-Assertion-添加Json断言（）"><a href="#Add-Assertions-Json-Assertion-添加Json断言（）" class="headerlink" title="Add Assertions Json Assertion 添加Json断言（）"></a>Add Assertions Json Assertion 添加Json断言（）</h3><h3 id="Add-Listener-Assertion-Results-添加断言结果（）"><a href="#Add-Listener-Assertion-Results-添加断言结果（）" class="headerlink" title="Add Listener Assertion Results 添加断言结果（）"></a>Add Listener Assertion Results 添加断言结果（）</h3><h2 id="结果报告"><a href="#结果报告" class="headerlink" title="结果报告"></a>结果报告</h2><h3 id="Add-Listener-View-Results-Tree-添加察看结果树（）"><a href="#Add-Listener-View-Results-Tree-添加察看结果树（）" class="headerlink" title="Add Listener View Results Tree 添加察看结果树（）"></a>Add Listener View Results Tree 添加察看结果树（）</h3><h3 id="Add-Listener-Aggregate-Report-添加聚合报告（）"><a href="#Add-Listener-Aggregate-Report-添加聚合报告（）" class="headerlink" title="Add Listener Aggregate Report 添加聚合报告（）"></a>Add Listener Aggregate Report 添加聚合报告（）</h3><p><strong>聚合报告参数详解</strong></p>
<ol>
<li>Label：每个 <code>JMeter</code> 的 <code>element</code>（例如我这里只有一个 <code>Spring WebFlux</code>）都有一个 <code>Name</code> 属性，这里显示的就是 <code>Name</code> 属性的值。</li>
<li>样本(Samples)：请求数——表示这次测试中一共发出了多少个请求，我这里模拟了<code>100</code>个用户循环<code>6</code>次也就为<code>100*6=600</code>。</li>
<li>平均值(Average)：平均响应时间 (单位:<code>ms</code>)。默认是单个<code>Request</code>的平均响应时间，当使用了<code>Transaction Controller</code>时，也可以是<code>Transaction</code>为单位显示平均响应时间。</li>
<li>中位数(Median)： 50％ 用户的响应时间。</li>
<li>90% 百分位(Line)：90％用户的响应时间。相邻几个<code>*%</code>同意。</li>
<li>最小值(Min)：最小响应时间。</li>
<li>最大值(Max)：最大响应时间。</li>
<li>异常(Error) %：错误率——错误请求数&#x2F;请求总数。</li>
<li>吞吐量(Throughput)：吞吐量——默认情况下表示每秒完成的请求数（<code>Request per Second</code>），当使用了 <code>Transaction Controller</code> 时，也可以表示类似 <code>LoadRunner</code> 的 <code>Transaction per Second</code> 数 。</li>
<li>接收 KB&#x2F;Sec：每秒从服务器端接收到的数据量，相当于<code>LoadRunner</code>中的<code>Throughput/Sec</code>。</li>
<li>发送 KB&#x2F;Sec：每秒向服务器发送的数据量，相当于<code>LoadRunner</code>中的<code>Throughput/Sec</code>。</li>
</ol>
<blockquote>
<p>一般而言，性能测试中我们需要重点关注的数据有： Samples、Average、Min、Max、Error、Throughput。</p>
</blockquote>
<blockquote>
<p><a target="_blank" rel="noopener" href="https://www.jianshu.com/p/6bc152ca6126">Apache JMeter 入门教程</a></p>
<p><a target="_blank" rel="noopener" href="https://baike.baidu.com/item/%E8%BD%AF%E4%BB%B6%E5%8E%8B%E5%8A%9B%E6%B5%8B%E8%AF%95/10364657">软件压力测试</a></p>
</blockquote>

    </div>

    
    
    

    <footer class="post-footer">
          <div class="post-tags">
              <a href="/tags/Jmeter/" rel="tag"># Jmeter</a>
              <a href="/tags/%E6%B5%8B%E8%AF%95/" rel="tag"># 测试</a>
          </div>

        

          <div class="post-nav">
            <div class="post-nav-item">
                <a href="/2021/11/28/%E7%AE%97%E6%B3%95%E9%A2%98API/" rel="prev" title="算法题C++模板API">
                  <i class="fa fa-chevron-left"></i> 算法题C++模板API
                </a>
            </div>
            <div class="post-nav-item">
                <a href="/2021/11/29/Redis%E5%AE%9E%E7%8E%B0%E5%88%86%E5%B8%83%E5%BC%8F%E9%94%81/" rel="next" title="Redis实现分布式锁">
                  Redis实现分布式锁 <i class="fa fa-chevron-right"></i>
                </a>
            </div>
          </div>
    </footer>
  </article>
</div>






</div>
  </main>

  <footer class="footer">
    <div class="footer-inner">


<div class="copyright">
  &copy; 
  <span itemprop="copyrightYear">2023</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">SongyangJi</span>
</div>
  <div class="powered-by">由 <a href="https://hexo.io/" rel="noopener" target="_blank">Hexo</a> & <a href="https://theme-next.js.org/muse/" rel="noopener" target="_blank">NexT.Muse</a> 强力驱动
  </div>

    </div>
  </footer>

  
  <div class="toggle sidebar-toggle" role="button">
    <span class="toggle-line"></span>
    <span class="toggle-line"></span>
    <span class="toggle-line"></span>
  </div>
  <div class="sidebar-dimmer"></div>
  <div class="back-to-top" role="button" aria-label="返回顶部">
    <i class="fa fa-arrow-up fa-lg"></i>
    <span>0%</span>
  </div>

<noscript>
  <div class="noscript-warning">Theme NexT works best with JavaScript enabled</div>
</noscript>


  
  <script src="https://cdnjs.cloudflare.com/ajax/libs/animejs/3.2.1/anime.min.js" integrity="sha256-XL2inqUJaslATFnHdJOi9GfQ60on8Wx1C2H8DYiN1xY=" crossorigin="anonymous"></script>
<script src="/js/comments.js"></script><script src="/js/utils.js"></script><script src="/js/motion.js"></script><script src="/js/schemes/muse.js"></script><script src="/js/next-boot.js"></script>

  <script src="https://cdnjs.cloudflare.com/ajax/libs/hexo-generator-searchdb/1.4.1/search.js" integrity="sha256-1kfA5uHPf65M5cphT2dvymhkuyHPQp5A53EGZOnOLmc=" crossorigin="anonymous"></script>
<script src="/js/third-party/search/local-search.js"></script>





  





</body>
</html>
